home *** CD-ROM | disk | FTP | other *** search
- /*
- Visual FX Arexx Script
- Written By J.L. White
- (C)1997 Merlin's Software
- */
-
- Options Results
- address "IMAGEFX.1"
- ScreenToFront
- Undo Off
- if exists("libs:flyer.library") then do
- TOASTERLIB="ToasterARexx.port"
- call remlib('ToasterARexx.port')
- call remlib('PROJECT_REXX_PORT')
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib(TOASTERLIB,0)
- end
- call Settings()
- call open TempFile,"VFXIFX:TempDrawer/"FXNum".txt",R
- line = readln(TempFile)
- Color = strip(line)
- line = readln(TempFile)
- ColorPic = strip(line)
- line = readln(TempFile)
- PicName = strip(line)
- line = readln(TempFile)
- Scroll = strip(line)
- line = readln(TempFile)
- XOff = strip(line)
- line = readln(TempFile)
- YOff = strip(line)
- line = readln(TempFile)
- TurnD = strip(line)
- call close (TempFile)
- ActiveColor Color
- ActiveColor
- j = 0
- TFrames = Frames
- if Field = 1 then TFrames = Frames*2
- do i = 1 to Frames
- call open TempFile,"RAM:VFXNums",W
- call writeln TempFile,right(i,5,'0')
- call writeln TempFile,right(Frames,5,'0')
- call close TempFile
- f = 0
- Redraw Off
- FieldSet = 0
- if Padding ~= -1 & i = 1 then call PadIt(1)
- call LoadB()
- call LoadA()
- j = j + 1
- call DoIt()
- Redraw On
- call SaveIt()
- if Field = 1 then do
- Redraw Off
- FieldSet = 1
- call LoadB()
- call LoadA()
- j = j + 1
- call DoIt()
- Redraw On
- call SaveIt()
- end
- if Padding ~= -1 & i = Frames then call PadIt(2)
- end
- if SaveType = 0 then do
- if Padding = -1 then
- call MakeIcon(SaveName,(Frames-10))
- else
- call MakeIcon(SaveName,(Padding+(Frames-10)))
- end
- ActiveColor 1
- ActiveColor
- Undo On
- exit
-
-
- PadIt:
- arg PadNum
- if (POS('FLY_1',SHOW('Ports')) = 0) then do
- Undo On
- exit
- end
- if PadNum = 1 then do
- if IAType = 0 then do
- do Pad = Padding to 1 by -1
- LoadBuffer PicAName Force StartA-(Pad-1)
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- call RecordAdd(SaveName,2,6,Compression)
- end
- end
- if IAType = 1 then do
- LoadBuffer PicAName Force 1
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- call RecordAdd(SaveName,2*Padding,6,Compression)
- end
- if IAType = 2 then do
- LoadBuffer PicAName Force
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- call RecordAdd(SaveName,2*Padding,6,Compression)
- end
- if IAType = 3 then do
- do Pad = Padding to 1 by -1
- LoadBuffer PicAName""right(StartA-(Pad-1),3,'0') Force
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- call RecordAdd(SaveName,2,6,Compression)
- end
- end
- end
- else do
- if IBType = 0 then do
- do Pad = 1 to Padding
- LoadBuffer PicBName Force StartB+Pad+Frames
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- call RecordAdd(SaveName,2,6,Compression)
- end
- end
- if IBType = 1 then do
- LoadBuffer PicBName Force 1
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- call RecordAdd(SaveName,2*Padding,6,Compression)
- end
- if IBType = 2 then do
- LoadBuffer PicBName Force
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- call RecordAdd(SaveName,2*Padding,6,Compression)
- end
- if IBType = 3 then do
- do Pad = 1 to Padding
- LoadBuffer PicBName""right(StartB+Pad+Frames),3,'0') Force
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- call RecordAdd(SaveName,2,6,Compression)
- end
- end
- end
- return
-
- LoadA:
- if (POS('FLY_1',SHOW('Ports')) = 0) then do
- Undo On
- exit
- end
- if i > Frames/2 then return
- if IAType = 0 then do
- LoadBuffer PicAName Force i+StartA
- GetMain
- parse var result Name Width Height Blah
- if FieldSet = 0 then do
- Hook DeInterlace
- Scale Width Height
- end
- if FieldSet = 1 then do
- Hook DeInterlace
- Swap
- Scale Width Height
- end
- end
- if IAType = 1 then do
- LoadBuffer PicAName Force 1
- end
- if IAType = 2 then do
- LoadBuffer PicAName Force
- end
- if IAType = 3 then do
- LoadBuffer PicAName""right(i+StartA,3,'0') Force
- end
- return
-
- LoadB:
- if (POS('FLY_1',SHOW('Ports')) = 0) then do
- Undo On
- exit
- end
- if i <= Frames/2 then return
- if IBType = 0 then do
- LoadBuffer PicBName Force i+StartB
- GetMain
- parse var result Name Width Height Blah
- if FieldSet = 0 then do
- Hook DeInterlace
- Scale Width Height
- end
- if FieldSet = 1 then do
- Hook DeInterlace
- Swap
- Scale Width Height
- end
- end
- if IBType = 1 then do
- LoadBuffer PicBName Force 1
- end
- if IBType = 2 then do
- LoadBuffer PicBName Force
- end
- if IBType = 3 then do
- LoadBuffer PicBName""right(i+StartB,3,'0') Force
- end
-
-
- return
-
-
- DoIt:
- if (POS('FLY_1',SHOW('Ports')) = 0) then do
- Undo On
- exit
- end
-
- if j = 1 then do
- return
- end
-
- if j = TFrames then do
- return
- end
-
- ByNum = 180
- NewNum = ((j-1)*ByNum)/((TFrames/2)-1)
- NewNum = trunc(NewNum)
- if j > (TFrames/2) then
- NewNum = ((ByNum -(((j-1) * ByNum)/(TFrames-1)))%1)*2
- NewNum = trunc(NewNum)
-
- ByNum2 = 100
- NewNum2 = ((j-1)*ByNum2)/((TFrames/2)-1)
- NewNum2 = trunc(NewNum2)
- if j > (TFrames/2) then
- NewNum2 = ((ByNum2 -(((j-1) * ByNum2)/(TFrames-1)))%1)*2
- NewNum2 = trunc(NewNum2)
-
- NewNum = -NewNum
- NewNum2 = -NewNum2
- if ColorPic = 1 then do
- Swap
- LoadBuffer PicName Force
- if Scroll = 1 then
- Roll XOff*j YOff*j
- Swap
- end
-
- if TurnD = 1 then NewNum = -NewNum
- if TurnD = 3 then NewNum = -NewNum
-
- if ColorPic = 1 then do
- if TurnD = 0 then Hook Perspective '0' '0' '0' NewNum '0' '0' '0' '0' -2 0 -1 0 SwapTile AntiAlias
- if TurnD = 1 then Hook Perspective '0' '0' '0' NewNum '0' '0' '0' '0' -2 0 -1 0 SwapTile AntiAlias
- if TurnD = 2 then Hook Perspective '0' '0' '0' '0' NewNum '0' '0' '0' -2 0 -1 0 SwapTile AntiAlias
- if TurnD = 3 then Hook Perspective '0' '0' '0' '0' NewNum '0' '0' '0' -2 0 -1 0 SwapTile AntiAlias
- if TurnD = 4 then Hook Perspective '0' '0' '0' '0' '0' NewNum NewNum2 NewNum2 1 1 1 0 SwapTile AntiAlias
- end
- else do
- if TurnD = 0 then Hook Perspective '0' '0' '0' NewNum '0' '0' '0' '0' -2 0 -1 0 DrawColor AntiAlias
- if TurnD = 1 then Hook Perspective '0' '0' '0' NewNum '0' '0' '0' '0' -2 0 -1 0 DrawColor AntiAlias
- if TurnD = 2 then Hook Perspective '0' '0' '0' '0' NewNum '0' '0' '0' -2 0 -1 0 DrawColor AntiAlias
- if TurnD = 3 then Hook Perspective '0' '0' '0' '0' NewNum '0' '0' '0' -2 0 -1 0 DrawColor AntiAlias
- if TurnD = 4 then Hook Perspective '0' '0' '0' '0' '0' NewNum NewNum2 NewNum2 1 1 1 0 DrawColor AntiAlias
- end
- return
-
- SaveIt:
- if (POS('FLY_1',SHOW('Ports')) = 0) then do
- Undo On
- exit
- end
- if SaveType = 0 then do
- call Switcher(TOSW)
- call Switcher(MDV1)
- Render Go
- if Field = 1 then
- call RecordAdd(SaveName,1,6,Compression)
- else
- call RecordAdd(SaveName,2,6,Compression)
- end
- if SaveType = 1 then do
- if Field = 1 then do
- f= f + 1
- if f = 1 then
- SaveBufferAs ILBM "VFXIFX:TempDrawer/PicA"
- if f = 2 then do
- GetMain
- parse var result Name Width Height Blah
- Scale Width Height/2
- Swap
- LoadBuffer "VFXIFX:TempDrawer/PicA" Force
- Scale Width Height/2
- Hook Interlace
- SaveBufferAs ILBM SaveName""right(i,3,'0')
- f = 0
- end
- end
- else do
- SaveBufferAs ILBM SaveName""right(i,3,'0')
- end
- end
-
- return
-
-